''' file预习 '''

# 读取
# f = open("note.txt","r",encoding="utf-8")
# f.seek(30)#移动指针位置
# f_r = f.read()
# print(f_r)

# 写入
# f_w = open("note2.txt","w",encoding="utf-8")
# f_w.write(f_r)

# 追加
# f_a = open("note2.txt","a",encoding="utf-8")
# f_a.write(f_r)
# f.close()


import os
from os import path

print(os.listdir())
# os.remove("note2.txt")

print(path.abspath("nihao.py"))
print(path.join("lll","nihao.py"))
print(path.exists("demo8.py"))
print(path.isdir("../20250708"))
print(path.isfile("demo1.py"))

print(path.abspath("a/b/1.txt"))